<!DOCTYPE html>
<html>
  <head>
    <title>我的Hello.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <script type="text/javascript" src="../javascript/lib/jquery-1.9.1/jquery-1.9.1.min.js"></script>
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <style type="text/css">
    	.class1 {
		    color: white;
		    background-color: black;
		    width:200px;
		    height:100px; 
		 }
		
		.class2 {
		    color: yellow;
		    background-color: red;
		    width:100px;
		    height:200px; 
		 }
    </style>
	<script type="text/javascript">
		$(function(){ 
			//链式操作
			var d = $("#myDiv").addClass("class1").find("p#aa").removeClass("class1");
			//非链式操作
			$("#myDiv").removeClass("class1");
			$("#myDiv").addClass("class2");
		});
	</script>
  </head>
  
  <body>
  	<div id="myDiv">
  		<p id="aa">aa aa aa aa</p>
  		<p id="bb">bb bb bb bb</p>
  	</div>
  </body>
</html>
